package cn.edu.suse.epilepsy.util;

import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

/**
 * @Author: QingShu
 * @Date: 2024/7/5 9:53
 */
public class BCrypUtil {
    private static BCryptPasswordEncoder encoder;

    static {
        encoder = new BCryptPasswordEncoder();
    }
    public static String encode(String rawPassword){
        return encoder.encode(rawPassword);
    }
    public static Boolean matches(String rawPassword,String encodedPassword){
        return encoder.matches(rawPassword,encodedPassword);
    }
}
